package com.wzh.borrow.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wzh.common.utils.PageUtils;
import com.wzh.common.utils.Query;

import com.wzh.borrow.dao.BorrowDao;
import com.wzh.borrow.entity.BorrowEntity;
import com.wzh.borrow.service.BorrowService;


@Service("borrowService")
public class BorrowServiceImpl extends ServiceImpl<BorrowDao, BorrowEntity> implements BorrowService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String tel = (String) params.get("tel");
        IPage<BorrowEntity> page = this.page(
                new Query<BorrowEntity>().getPage(params),
                new QueryWrapper<BorrowEntity>().eq("uid",tel)
        );

        return new PageUtils(page);
    }

}